import Mock from 'mockjs'
import * as loginAPI from './login'
import * as homepageAPI from './homepage'
import * as excel from './excel'
import * as employManage from './employee_manage'
import './admin_manage'
import './product_manage'
import './order_manage'
import './user'
import './promotion_manage'

Mock.setup({
  timeout: '100-600'
})

// 登录相关接口
Mock.mock('/login/login', 'post', loginAPI.login)
Mock.mock('/login/logout', 'post', loginAPI.logout)

// 首页 homepage 相关的接口
Mock.mock('/homepage/hometotal', 'post', homepageAPI.getHomeTotal)
// 首页 homepageDetailItem 接口
Mock.mock('/homepage/detailItem', 'post', homepageAPI.getHomeDetailItem)
// 首页 investmentRank 接口
Mock.mock('/homepage/investmentRank', 'post', homepageAPI.getHomeInvestmentRank)

// 表格部分【导出表格中的票房数据】
Mock.mock('/api/getmoviepiaofang-mock', 'post', excel.piaofang)

// 获取业务范围
Mock.mock('/product/product_catalogue', 'get', employManage.productCatalogue)
// 获取业务员列表
Mock.mock('/employee_manage/search', 'post', employManage.employeeInfo)

export default Mock
